<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>三目运算符</title>
</head>
<body>
	<script type="text/javascript">
		var tem = {}
		tem.sex = 0
		console.log(tem.sex === 1 ? '男' : tem.sex === 0 ? '女' : '保密')
	</script>
</body>
</html>